ROSTemplateFormatVersion: '2015-09-01'
Transform: 'Aliyun::Serverless-2018-04-03'
Resources:
  {{ service }}:
    Type: 'Aliyun::Serverless::Service'
    Properties:
      Description: 'helloworld'
    {{ projectName }}_http:
      Type: 'Aliyun::Serverless::Function'
      Properties:
        Handler: http.handler
        Runtime: custom
        MemorySize: 512
        CodeUri: './bin'
      Events:
        http_t:
          Type: HTTP
          Properties:
            AuthType: ANONYMOUS
            Methods: ['GET', 'POST', 'PUT', 'DELETE']
  my_domain:
    Type: 'Aliyun::Serverless::CustomDomain'
    Properties:
      DomainName: Auto
      Protocol: HTTP
      RouteConfig:
        Routes: 
          '/*':
            ServiceName: {{ service }}
            FunctionName: {{ projectName }}_http